From e3b418ac491919127211b4d3c692d431061d7c09 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Fri, 21 Dec 2018 17:23:32 +0000 Subject: [PATCH] x86/pvh-dom0: Remove unnecessary function pointer call from modify_identity_mmio() Function pointer calls are far more expensive in a post-Spectre world, and this one doesn't need to be. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Wei Liu Acked-by: Jan Beulich Release-acked-by: Juergen Gross --- xen/arch/x86/hvm/dom0_build.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c index 303c44b5d9..51cf490811 100644 --- a/xen/arch/x86/hvm/dom0_build.c +++ b/xen/arch/x86/hvm/dom0_build.c @@ -79,8 +79,8 @@ static int __init modify_identity_mmio(struct domain *d, unsigned long pfn, for ( ; ; ) { - rc = (map ? map_mmio_regions : unmap_mmio_regions) - (d, _gfn(pfn), nr_pages, _mfn(pfn)); + rc = map ? map_mmio_regions(d, _gfn(pfn), nr_pages, _mfn(pfn)) + : unmap_mmio_regions(d, _gfn(pfn), nr_pages, _mfn(pfn)); if ( rc == 0 ) break; if ( rc < 0 ) -- 2.30.2